/**
 * index页面的widget配置
 * @copyright 火星科技 mars3d.cn
 * @author 火星渣渣灰 2022-02-19
 */
import { defineAsyncComponent, markRaw } from "vue"
import { WidgetState } from "@mars/common/store/widget"
import { StoreOptions } from "vuex"

const store: StoreOptions<WidgetState> = {
  state: {
    widgets: [
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/query-poi/index.vue"))),
        name: "query-poi",
        autoDisable: true
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/toolbar/index.vue"))),
        name: "toolbar",
        autoDisable: true
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-basemap/index.vue"))),
        name: "manage-basemap",
        group: "manage"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/index.vue"))),
        name: "manage-layers",
        group: "manage",
        disableOther: ["roamLine"]
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/scene-tree.vue"))),
        name: "layer-scenetree"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/picture-heatmap.vue"))),
        name: "layer-picture-heatmap"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/picture-guihua.vue"))),
        name: "layer-picture-guihua"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/location-point/index.vue"))),
        name: "location-point",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/map-compare/index.vue"))),
        name: "map-compare",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/four-compare/index.vue"))),
        name: "four-compare",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/map-split/index.vue"))),
        name: "map-split",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/query-route/index.vue"))),
        name: "query-route",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/roamLine-list/index.vue"))),
        name: "roamLine-list",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/roamLine/index.vue"))),
        name: "roamLine",
        group: "tools",
        disableOther: ["manage-layers"]
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/graphic-plot/index.vue"))),
        name: "graphic-plot",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/graphic-plot/add-plot-tree.vue"))),
        name: "addPlotTree"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/graphic-options/index.vue"))),
        name: "graphic-options",
        group: "tools",
        disableOther: false
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/bookmark/index.vue"))),
        name: "bookmark",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/measure/index.vue"))),
        name: "measure",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/location-region/index.vue"))),
        name: "location-region",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/addmarker/index.vue"))),
        name: "addmarker",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/analysis/index.vue"))),
        name: "analysis",
        group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/street-view/index.vue"))),
        name: "street-view",
        autoDisable: true,
        disableOther: true
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/print/index.vue"))),
        name: "print",
        autoDisable: true,
        disableOther: true
      },

      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/control-clock/index.vue"))),
        name: "control-clock",
        group: "tools"
      }
    ],
    openAtStart: ["query-poi", "toolbar"]
  }
}

export default store
